package com.example.springhelloworld.services;

import com.example.springhelloworld.mapper.StudentAnnoDao;
import com.example.springhelloworld.mapper.StudentDao;
import com.example.springhelloworld.pojo.Student;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StudentServiceAnnoImpl implements StudentAnnoService{

@Resource
private StudentAnnoDao studentAnnoDao;


    @Override
    public Student queryById(int id) {
        return studentAnnoDao.queryById(id);
    }

    @Override
    public Student queryByName(String name) {
        return studentAnnoDao.queryByName(name);
    }

    @Override
    public int addUser(Student student) {
        Student student1=new Student(2,3,4,5,"注解");
        return studentAnnoDao.addUser(student);
    }

    @Override
    public int updateStudent(int id) {
        return studentAnnoDao.updateStudent(id);
    }

    @Override
    public int deleteStudent(int id) {
        return studentAnnoDao.deleteStudent(id);
    }
}
